﻿namespace Rally_MvvmC.ViewModels
{
    using System.Web.Mvc;
    using Rally_MvvmC.Library;

    public class ErrorViewModel : PageViewModelBase
    {
        public ErrorViewModel(string pageName = "Page/Error")
            : base(pageName)
        {
        }

        public string ErrorUrl { get; set; }

        public HandleErrorInfo HandleErrorInfo { get; set; }

        public void Log404()
        {
            var ex = new System.Web.HttpException(404, "Page not found: " + this.ErrorUrl);
            Rally_MvvmC.Exceptions.Logger.LogException(ex);
        }
    }
}